using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Webadmin_Modules_Configuration_ConfigPreviewLogin : bzAdminPageBase
{
      

    //----------------------------------------------------------------------------------

    public DataTable _dt = new DataTable();
    public bzLog bz = new bzLog();
    protected void Page_Load(object sender, EventArgs e)
    {
        this.initSiteLang(bzSiteOption.Group.Administrator, bzSiteOption.None, "Log");
    }
    private void delete()
    {
        if (this.AllowDelete)
        {

            string chk = Request.Form["Chk"] == null ? "-1" : Request.Form["Chk"];
            int count = bz.deleteRecord(chk.Split(','));
            if (count < chk.Split(',').Length)
                Response.Write(bzStringClass.addStringAlert(this.AdminLang["ChildrenNotEmpty"].ToString()));
        }
        else
        {
            Response.Redirect(bzStringClass.AlertPermission);
        }
    }
   
    override protected void loadAction()
    {
        if (!IsPostBack)
        {            
            switch (this.Act)
            {                
               // case "Del": this.delete(); break;
            }
            this.showData();
        }

    }   
    
    private void showData()
    {
        bz.deleteMonth();
        this.SearchString = "";
        this.Navigator = this.AdminLang["MenuConfig"].ToString() + this.AdminLang["GeneralArrow"].ToString() + this.AdminLang["MenuConfigPreviewLogin"].ToString();
        this.loadPagination(bz.getTotal(), Convert.ToInt32(this.SiteOption["AdminLimit"]), Session["Page"] + "?" + this.SearchString);
        _dt = bz.getTable(this.CurrentPage.ToString(), this.SiteOption["AdminLimit"].ToString());
    }   
}
